/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.appspot.trafficando.domain;

import java.util.List;
import java.util.Set;
import org.apache.abdera.ext.geo.Point;
import org.apache.abdera.model.Feed;

/**
 *
 * @author Domenico Maria Giffone
 */
public interface EventAggregator {


    /**
     * Retrieve the events that happened within the specified range from the user location.
     *
     * @param coordinate
     *   the Abdera geo coordinate of the user
     * @param distance
     *  the maximum distance in meters of events from the location of the user
     * @param interests
     *  the set of event type to include
     * @param order
     *     the order of the resulting feed
     * @return
     *  a Feed that contains the list of required feeds
     */
    public Feed getNearestEvents(Point coordinate, Integer distance, Set<EventType> interests, SortOrder order);

    /**
     * Retrieve the events that happened within the specified range from the user location.
     *
     * @param coordinate
     *   the Abdera geo coordinate of the user
     * @param distance
     *  the maximum distance in meters of events from the location of the user
     * @param interests 
     *  the set of event type to include
     * @return
     *  a Document that contains the list of required feeds
     */
    public Feed getNearestEvents(Point coordinate, Integer distance, Set<EventType> interests);

    /**
     * Retrieve the events that happened within the specified range from the user location.
     *
     *@param coordinate
     *   the Abdera geo coordinate of the user
     * @param distance
     *  the maximum distance in meters of events from the location of the user
     * @return
     *  a Document that contains the list of required feeds
     */
    public Feed getNearestEvents(Point coordinate, Integer distance);

    /**
     * Add a providers list to this aggregator
     * 
     * @param providers
     *   the list of providers
     */
    public void setProviders(List<EventProvider> providers);
}
